Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix campaigns dropdown output #22

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open

Fix campaigns dropdown output #22

wants to merge 1 commit into from

Conversation

jaymcp
Copy link
Contributor

@jaymcp jaymcp commented Mar 4, 2025

At some point, WooCommerce Checkout Manager updated its Additional Fields output. Unfortunately, we didn't catch this, and so campaigns output in the donation block on the frontend ceased to function.
This PR fixes the frontend output.

Steps to test:

  1. ensure you have WooCommerce Checkout Manager enabled
  2. go to wp-admin -> woocommerce -> settings -> checkout -> additional
  3. add a new field if there isn't one already existing
  4. the field should be a select, and should have more than one option
  5. note the field id (e.g. additional_wooccm0)
  6. edit a post/page
  7. insert a donation block
  8. in the sidebar, there should be a panel labelled "Campaigns"
  9. the panel should contain a dropdown labelled "Campaign options field"
  10. the dropdown should contain the field you added in step 4
  11. when selecting that field from the dropdown, the block should render a dropdown containing the options you added to the field in step 4
  12. save, and view the frontend
  13. the campaigns dropdown should render correctly within the block
  14. choose a donation amount, and a campaign
  15. click donate
  16. you should be redirected to WooCommerce checkout
  17. the additional field should render in the checkout form
  18. your selected option should be pre-selected in the dropdown

@jaymcp jaymcp requested a review from Gentyspun March 4, 2025 13:26
@jaymcp jaymcp added the bug Something isn't working label Mar 4, 2025
@jaymcp jaymcp self-assigned this Mar 5, 2025
Copy link

@Gentyspun Gentyspun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: PR Approved (ready for DEV)
Development

Successfully merging this pull request may close these issues.

2 participants